package com.atguigu.common.exception;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * @author centurion
 * @description: TODO
 * @date 2024/5/27
 */
// @AllArgsConstructor  // TODO 此处 idea 识别不了 lombok 生成的 全参构造方法
public enum BizCodeEnum {
    UNKNOWN_EXCEPTION(100000, "系统未知异常"),
    VALID_EXCEPTION(100001, "参数格式校验失败"),
    PRODUCT_UP_EXCEPTION(11000, "商品上架异常");

    BizCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    private int code;
    private String message;

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
